<?php
/**
 * 
 * @authors liuqinglin 
 * @email (2961181429@qq.com) 
 * @(https://my.oschina.net/u/2831203)
 * @date    2016-11-21 12:02:21
 * @version $Id$
 */
//前台控制器
class Home_Controller extends CI_Controller {
    
    public function __construct()
    {
        parent::__construct();

        $this->load->switch_theme_on();
    }
}
//后台控制器
class Admin_Controller extends CI_Controller {
    
    public function __construct()
    {
        parent::__construct();

        $this->load->switch_theme_off();
    }
    //@function:success 操作成功跳转页面 
    //$message 成功提示页面  $url 跳转地址  $t 几秒后跳转
    public function success($message = '操作成功！',$url = 'admin/system',$t = 2)
    {
    	$data['message'] = $message;
    	$data['url'] = $url;
    	$data['t'] = $t;
    	$this->load->view('templates/success',$data);
    }   
    //failure 错误提示页面 
    public function failure($message = '操作失败！！！',$url = 'admin/system',$t = 3)
    {
    	$data['message'] = $message;
    	$data['url'] = $url;
    	$data['t'] = $t;
    	$this->load->view('templates/failure',$data);
    }
}